package com.zhu.gmallpublisher.mapper;

import com.zhu.gmallpublisher.bean.ActivityReduceStats;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 活动主题
 */
public interface ActivityStatsMapper {

    @Select("select sum(order_activity_reduce_amount) as activity_reduce_amount," +
            "sum(order_origin_total_amount) origin_total_amount," +
            "round(round(toFloat64(activity_reduce_amount),5/" +
            "round(toFloat64(activity_total_amount),5),20) subsidyRate")
    List<ActivityReduceStats> selectActivityReduceStats (@Param(value = "date") Integer selectDate);
}
